package cn.edu.ctbu.jpatest.entity;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.Table;
import lombok.Data;

/**
 * @author xiaopeng
 * @version 1.0
 */
@Data
@Entity(name = "tb_sc") //Spring 3.0 在注解Entity中已经移除了name属性
/*@Entity
@Table(name = "tb_sc")*/
@IdClass(SCPK.class) //复合主键
public class SC {
    @Id
    private String sno;

    @Id
    private String cno;

    /**
     * 成绩
     */
    private Integer grade;
}
